package com.ruoyi.domain.base;

import cn.hutool.core.io.resource.ResourceUtil;
import cn.hutool.core.text.csv.CsvReader;
import cn.hutool.core.text.csv.CsvUtil;

import java.nio.charset.Charset;
import java.util.List;

public class SpbmJbxxInstance {
    private static volatile List<SpbmJbxx> list;

    static {
       readFileData();
    }
    private static void readFileData(){
        final CsvReader reader = CsvUtil.getReader();
        list = reader.read(ResourceUtil.getReader("invoice/SpbmJbxx.csv", Charset.forName("gbk")), SpbmJbxx.class);
    }

    public static List<SpbmJbxx> getList(){
        if(list == null){
            synchronized (SpbmJbxxInstance.class) {
                if (list == null){
                    readFileData();
                }
            }
        }
        return list;
    }


}
